package com.zhangxu.microservice.system.web.config.swagger;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Swagger文档配置
 */
@Configuration
public class SwaggerConfig {

    /**
     * 配置OpenAPI文档信息
     */
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("系统服务 API")
                        .version("1.0")
                        .description("系统服务接口文档")
                        .termsOfService("https://zhangxu.com")
                        .license(new License().name("Apache 2.0").url("https://springdoc.org")));
    }
}